route
routing/route
Type: Directory
A read-only table that lists routes from all the address families as well as all filtered routes with all possible route attributes.
Default example output of the table with various route types:
[admin@MikroTik] /routing/route> print
Flags: A - ACTIVE; c, s, a, l, y - COPY; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, AFI, DISTANCE, SCOPE, TARGET-SCOPE, IMMEDIATE-GW
DST-ADDRESS GATEWAY AFI D SCOPE TA IMMEDIATE-GW
lH 10.0.0.0/8 ip4 0
;;; defconf
As 10.0.0.0/8 10.155.130.1 ip4 1 30 10 10.155.130.1%ether1
lH 10.155.130.0/25 ip4 0
Ac 10.155.130.0/25 ether1 ip4 0 10 ether1
aH 10.155.130.12/32 ip4 0
lH 111.13.0.0/24 ip4 0
Ac 111.13.0.0/24 ether2 ip4 0 10 ether2
aH 111.13.0.1/32 ip4 0
Ac 111.111.111.2/32 loopback@vrfTest ip4 0 10 loopback
Ac 2111:4::/64 ether2 ip6 0 10 ether2
Ac fe80::%ether1/64 ether1 ip6 0 10 ether1
Ac fe80::%ether2/64 ether2 ip6 0 10 ether2
Ac fe80::%ether3/64 ether3 ip6 0 10 ether3
Ac fe80::%ether4/64 ether4 ip6 0 10 ether4
Ac 3333::2/128 loopback@vrfTest ip6 0 10 loopback
Ac fe80::%loopback/64 loopback@vrfTest ip6 0 10 loopback
Ay 111.111.111.2/32&65530:100 loopback@vrfTest vpn4 0 10 5 loopback
Ay 3333::2/128&65530:100 loopback@vrfTest vpn6 0 10 5 loopback
A H ether1 link 0
A H ether2 link 0
A H ether3 link 0
A H ether4 link 0
A H loopback link 0
Detailed example output with some BGP, OSPF, and other routes:
[admin@MikroTik] /routing/route> print detail
Flags: X - disabled, F - filtered, U - unreachable, A - active;
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, a - ldp-, l - ldp-mapping, y - copy; H - hw-offloaded;
+ - ecmp, B - blackhole
o afi=ip4 contribution=best-candidate dst-address=0.0.0.0/0 routing-table=main gateway=10.155.101.1%ether1 immediate-gw=10.155.101.1%ether1
distance=110 scope=20 target-scope=10 belongs-to="OSPF route"
ospf.metric=2 .tag=111 .type=ext--1
debug.fwp-ptr=0x203425A0
Ad + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
distance=1 scope=30 target-scope=10 vrf-interface=ether1 belongs-to="DHCP route"
debug.fwp-ptr=0x20342060
As + afi=ip4 contribution=active dst-address=0.0.0.0/0 routing-table=main pref-src="" gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1
distance=1 scope=30 target-scope=10 belongs-to="Static route"
debug.fwp-ptr=0x20342060
Fb afi=ip4 contribution=filtered dst-address=1.0.0.0/24 routing-table=main gateway=10.155.101.1 immediate-gw=10.155.101.1%ether1 distance=20
scope=40 target-scope=10 belongs-to="BGP IP routes from 10.155.101.217" rpki=valid
bgp.peer-cache-id=*B000002 .aggregator="13335:172.68.180.1" .as-path="65530,100,9002,13335" .atomic-aggregate=yes .origin=igp
debug.fwp-ptr=0x20342960
missing hw-offloaded (yes | no) Indicates whether the route is eligible to be hardware offloaded on supported hardware.
| Flag | Name | Description |
|---|---|---|
| X | disabled | disabled |
| F | filtered | A flag indicates whether the route was filtered by routing filters and excluded from being used as the best route. |
| U | unreachable | A flag indicates whether the route next-hop is unreachable. |
| A | active | A flag indicates whether the route is elected as Active and eligible to be added to the FIB. |
| c | connect | connect |
| s | static | static |
| r | rip | rip |
| b | bgp | A flag indicates whether this route was added by the BGP protocol. |
| n | bgp-net | bgp-net |
| o | ospf | ospf |
| i | isis | isis |
| d | dhcp | A flag indicates whether the route was added by the DHCP service. |
| v | vpn | A flag indicates whether the route was added by one of the VPN protocols (PPPoE, L2TP, SSTP, etc.) |
| m | modem | A flag indicates whether the route is added by the LTE or 3g modems. |
| a | ldp-address | A flag indicates whether the route entry is an LDP address. |
| l | ldp-mapping | A flag indicates whether the route entry is the LDP mapping. |
| g | slaac | slaac |
| y | bgp-mpls-vpn | A flag indicates a copy of the route to be redistributed as the L3VPN route. VPNv4/6 related attributes are attached to this route. |
| e | evpn | evpn |
| H | hw-offloaded | hw-offloaded |
| + | ecmp | A flag indicates whether the route is added as an Equal-Cost Multi-Path route in the FIB |
| B | blackhole | A flag indicates whether it is a blackhole route. |
| Read-only Argument | Type | Description |
|---|---|---|
| afi ( unset ) | enum (bad | ip | ipv6 | l2vpn | vpnv4 | vpnv6 | l2vpn-cisco | mip4 | mip6 | link | l2vpn-link | evpn) | Address family this route belongs to. |
| contribution | enum (filtered | unreachable | candidate | best-candidate | active) | Shows the route status contributing to the election process, e.g "filtered, active, candidate" |
| dst-address | address (flags=46i/SR) | |
| routing-table | enum | Routing table this route belongs to. |
| ve-id | num | |
| ve-block-offset | num | |
| ve-block-size | num | |
| label | num | |
| pref-src ( unset ) | address (flags=46) | |
| gateway | address (flags=46ivL) | Configured gateway, for the actually resolved gateway, see immediate-gw parameter. |
| nexthop-id ( unset ) | num | |
| immediate-gw | multi_arg { address (flags=46i) } | Shows actual (resolved) gateway and interface that will be used for packet forwarding. Displayed in format [ip%interface]. |
| check-gateway ( unset ) | enum (none | arp | ping | bfd) | Currently used check-gateway option. |
| distance ( unset ) | num | |
| scope ( unset ) | num | Scope used in the next-hop lookup process. Read more>> |
| target-scope ( unset ) | num | Target scope used in next-hop lookup process. Read more>>. |
| vrf-interface ( unset ) | interface_enum | Internal use only parameter which allows identifying to which VRF route should be added. Used by services that add routes dynamically, for example, DHCP client. Shown for debugging purposes. |
| belongs-to | string | Descriptive info showing from where the route was received. |
| local-address | address (flags=46iv) | Local IP address of the connected network. |
| route-cost | num | |
| total-cost | num | |
| rpki ( unset ) | enum (unknown | valid | invalid) | Current status of the prefix from the RPKI validation process. |
| bgp.session | enum | BGP session that installed the route. See /routing/bgp/session menu. |
| bgp.aggregator | string | |
| bgp.as-path | string | Value of the AS_PATH BGP attribute. |
| bgp.cluster-list | string | |
| bgp.communities | multi_arg { string } | Value of the COMMUNITIES BGP attribute. |
| bgp.ext-communities | multi_arg { string } | Value of the EXTENDED_COMMUNITIES BGP attribute. |
| bgp.large-communities | multi_arg { string } | Value of the LARGE_COMMUNITIES BGP attribute. |
| bgp.unknown | multi_arg { string } | Hex blob of unknown BGP attributes. |
| bgp.originator-id | address (flags=4) | |
| bgp.nexthop | multi_arg { address (flags=4) } | |
| bgp.out-nexthop | multi_arg { address (flags=4iv) } | |
| bgp.weight | num | |
| bgp.local-pref | num | Value of the LOCAL_PREF BGP attribute. |
| bgp.igp-metric | num | Value of the IGP_METRIC BGP attribute |
| bgp.pmsi | string | |
| bgp.med | num | Value of the MED BGP attribute. |
| bgp.atomic-aggregate | bool | |
| bgp.origin | enum (igp | egp | incomplete) | |
| bgp.esi | string | |
| bgp.otc | num | |
| route-distinguisher | string | |
| rip.tag | num | |
| rip.metric | num | |
| ospf.metric | num | |
| ospf.tag | num | |
| ospf.type | enum (intra | inter | ext-type-1 | ext-type-2 | nssa-type-1 | nssa-type-2) | |
| isis.type | enum (l1 | l2 | l1-inter | l1-ext | l2-ext | l1-inter-ext) | |
| isis.metric | num | |
| mpls.labels | multi_arg { num } | |
| mpls.in-label | num | Mapped MPLS ingress label. |
| mpls.out-label | num | Mapped MPLS egress label. |
| ldp.peer-id | num | |
| ldp.label | num | LDP mapped MPLS label. |
| mtu | num | |
| hoplimit | num | |
| debug.fwp-ptr | num | |
| debug.route-ptr | num | |
| debug.input.refs | num | |
| debug.input.size | num | |
| debug.input.ptr | num | |
| debug.input.raw | string | |
| debug.merge.refs | num | |
| debug.merge.size | num | |
| debug.merge.ptr | num | |
| debug.merge.raw | string |
routing/route/rule
Type: Directory
| Flag | Name | Description |
|---|---|---|
| X | disabled | disabled |
| I | inactive | inactive |
| Argument | Type | Description |
|---|---|---|
| src-address ( unset ) | address (flags=4iv/) | |
| dst-address ( unset ) | address (flags=4iv/) | |
| routing-mark ( unset ) | enum | |
| interface ( unset ) | interface_enum | |
| action | enum (lookup | lookup-only-in-table | unreachable | drop) | |
| table | enum () | |
| min-prefix ( unset ) | num |